package org.qqcui.designpattern.patterns.factory.factorymethod.order;

import org.qqcui.designpattern.patterns.factory.factorymethod.pizza.*;
import org.qqcui.designpattern.patterns.factory.simplefactory.pizza.CheesePizza;
import org.qqcui.designpattern.patterns.factory.simplefactory.pizza.PepperPizza;

/**
 * 伦敦披萨订购类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2020-10-17 22:09
 **/
public class LDOrderPizza extends OrderPizza {

	@Override
	public Pizza createPizza(String orderType) {
		Pizza pizza = null;
		if ("pepper".equals(orderType)) {
			pizza = new LDPepperPizza();
		} else if ("cheese".equals(orderType)) {
			pizza = new LDCheesePizza();
		}
		return pizza;
	}
}
